home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / mail / mh / contrib / 9302 / prunemail.shar < prev    next >
SHell self-extracting ARchive  |  1993-02-03  |  2.5 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: SHell self-extracting ARchive (archive/shar).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert SHell self-extracting ARchive (archive/shar) ext Supported
1% dexvert Text File (text/txt) fallback Supported
100% file POSIX shell script text executable default
99% file a /bin/sh script, ASCII text executable default (weak)
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% gt2 Shell Skript: '/bin/sh' default (weak)
100% detectItEasy Format: plain text[LF] default (weak)
100% binwalkID Executable script, shebang: "/bin/sh" default (weak)
100% xdgMime application/x-shellscript default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 23 21 20 2f 62 69 6e 2f | 73 68 0a 23 20 54 68 69 |#! /bin/|sh.# Thi|
|00000010| 73 20 69 73 20 61 20 73 | 68 65 6c 6c 20 61 72 63 |s is a s|hell arc|
|00000020| 68 69 76 65 2e 20 20 52 | 65 6d 6f 76 65 20 61 6e |hive. R|emove an|
|00000030| 79 74 68 69 6e 67 20 62 | 65 66 6f 72 65 20 74 68 |ything b|efore th|
|00000040| 69 73 20 6c 69 6e 65 2c | 20 74 68 65 6e 20 75 6e |is line,| then un|
|00000050| 70 61 63 6b 0a 23 20 69 | 74 20 62 79 20 73 61 76 |pack.# i|t by sav|
|00000060| 69 6e 67 20 69 74 20 69 | 6e 74 6f 20 61 20 66 69 |ing it i|nto a fi|
|00000070| 6c 65 20 61 6e 64 20 74 | 79 70 69 6e 67 20 22 73 |le and t|yping "s|
|00000080| 68 20 66 69 6c 65 22 2e | 20 20 54 6f 20 6f 76 65 |h file".| To ove|
|00000090| 72 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 0a |rwrite e|xisting.|
|000000a0| 23 20 66 69 6c 65 73 2c | 20 74 79 70 65 20 22 73 |# files,| type "s|
|000000b0| 68 20 66 69 6c 65 20 2d | 63 22 2e 20 20 59 6f 75 |h file -|c". You|
|000000c0| 20 63 61 6e 20 61 6c 73 | 6f 20 66 65 65 64 20 74 | can als|o feed t|
|000000d0| 68 69 73 20 61 73 20 73 | 74 61 6e 64 61 72 64 20 |his as s|tandard |
|000000e0| 69 6e 70 75 74 20 76 69 | 61 0a 23 20 75 6e 73 68 |input vi|a.# unsh|
|000000f0| 61 72 2c 20 6f 72 20 62 | 79 20 74 79 70 69 6e 67 |ar, or b|y typing|
|00000100| 20 22 73 68 20 3c 66 69 | 6c 65 22 2c 20 65 2e 67 | "sh <fi|le", e.g|
|00000110| 2e 2e 20 20 49 66 20 74 | 68 69 73 20 61 72 63 68 |.. If t|his arch|
|00000120| 69 76 65 20 69 73 20 63 | 6f 6d 70 6c 65 74 65 2c |ive is c|omplete,|
|00000130| 20 79 6f 75 0a 23 20 77 | 69 6c 6c 20 73 65 65 20 | you.# w|ill see |
|00000140| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 6d 65 |the foll|owing me|
|00000150| 73 73 61 67 65 20 61 74 | 20 74 68 65 20 65 6e 64 |ssage at| the end|
|00000160| 3a 0a 23 09 09 22 45 6e | 64 20 6f 66 20 73 68 65 |:.#.."En|d of she|
|00000170| 6c 6c 20 61 72 63 68 69 | 76 65 2e 22 0a 23 20 43 |ll archi|ve.".# C|
|00000180| 6f 6e 74 65 6e 74 73 3a | 20 20 52 45 41 44 2d 4d |ontents:| READ-M|
|00000190| 45 20 70 72 75 6e 65 6d | 61 69 6c 0a 23 20 57 72 |E prunem|ail.# Wr|
|000001a0| 61 70 70 65 64 20 62 79 | 20 6a 65 72 72 79 40 6f |apped by| jerry@o|
|000001b0| 72 61 2e 63 6f 6d 20 6f | 6e 20 54 68 75 20 46 65 |ra.com o|n Thu Fe|
|000001c0| 62 20 20 34 20 31 34 3a | 33 31 3a 35 30 20 31 39 |b 4 14:|31:50 19|
|000001d0| 39 33 0a 50 41 54 48 3d | 2f 62 69 6e 3a 2f 75 73 |93.PATH=|/bin:/us|
|000001e0| 72 2f 62 69 6e 3a 2f 75 | 73 72 2f 75 63 62 20 3b |r/bin:/u|sr/ucb ;|
|000001f0| 20 65 78 70 6f 72 74 20 | 50 41 54 48 0a 69 66 20 | export |PATH.if |
|00000200| 74 65 73 74 20 2d 66 20 | 27 52 45 41 44 2d 4d 45 |test -f |'READ-ME|
|00000210| 27 20 2d 61 20 22 24 7b | 31 7d 22 20 21 3d 20 22 |' -a "${|1}" != "|
|00000220| 2d 63 22 20 3b 20 74 68 | 65 6e 20 0a 20 20 65 63 |-c" ; th|en . ec|
|00000230| 68 6f 20 73 68 61 72 3a | 20 57 69 6c 6c 20 6e 6f |ho shar:| Will no|
|00000240| 74 20 63 6c 6f 62 62 65 | 72 20 65 78 69 73 74 69 |t clobbe|r existi|
|00000250| 6e 67 20 66 69 6c 65 20 | 5c 22 27 52 45 41 44 2d |ng file |\"'READ-|
|00000260| 4d 45 27 5c 22 0a 65 6c | 73 65 0a 65 63 68 6f 20 |ME'\".el|se.echo |
|00000270| 73 68 61 72 3a 20 45 78 | 74 72 61 63 74 69 6e 67 |shar: Ex|tracting|
|00000280| 20 5c 22 27 52 45 41 44 | 2d 4d 45 27 5c 22 20 5c | \"'READ|-ME'\" \|
|00000290| 28 33 35 38 20 63 68 61 | 72 61 63 74 65 72 73 5c |(358 cha|racters\|
|000002a0| 29 0a 73 65 64 20 22 73 | 2f 5e 58 2f 2f 22 20 3e |).sed "s|/^X//" >|
|000002b0| 27 52 45 41 44 2d 4d 45 | 27 20 3c 3c 27 45 4e 44 |'READ-ME|' <<'END|
|000002c0| 5f 4f 46 5f 46 49 4c 45 | 27 0a 58 54 68 69 73 20 |_OF_FILE|'.XThis |
|000002d0| 69 73 20 61 20 66 69 78 | 20 74 6f 20 74 68 65 20 |is a fix| to the |
|000002e0| 70 72 75 6e 65 2d 6d 61 | 69 6c 20 73 63 72 69 70 |prune-ma|il scrip|
|000002f0| 74 20 64 69 73 74 72 69 | 62 75 74 65 64 20 66 72 |t distri|buted fr|
|00000300| 6f 6d 20 66 74 70 2e 69 | 63 73 2e 75 63 69 2e 65 |om ftp.i|cs.uci.e|
|00000310| 64 75 2e 0a 58 54 68 65 | 20 6f 72 69 67 69 6e 61 |du..XThe| origina|
|00000320| 6c 20 63 6f 75 6c 64 20 | 64 65 6c 65 74 65 20 6d |l could |delete m|
|00000330| 65 73 73 61 67 65 73 20 | 74 68 61 74 20 64 69 64 |essages |that did|
|00000340| 20 6e 6f 74 20 68 61 76 | 65 20 61 6e 79 20 6d 65 | not hav|e any me|
|00000350| 73 73 61 67 65 2d 69 64 | 2c 0a 58 73 75 63 68 20 |ssage-id|,.Xsuch |
|00000360| 61 73 20 61 20 6d 65 73 | 73 61 67 65 20 66 69 6c |as a mes|sage fil|
|00000370| 65 64 20 77 69 74 68 20 | 46 63 63 2e 20 49 66 20 |ed with |Fcc. If |
|00000380| 74 68 65 72 65 20 77 65 | 72 65 20 6d 75 6c 74 69 |there we|re multi|
|00000390| 70 6c 65 20 73 75 63 68 | 20 6d 65 73 73 61 67 65 |ple such| message|
|000003a0| 73 0a 58 69 6e 20 61 20 | 66 6f 6c 64 65 72 2c 20 |s.Xin a |folder, |
|000003b0| 6f 6e 65 20 77 6f 75 6c | 64 20 62 65 20 73 65 6c |one woul|d be sel|
|000003c0| 65 63 74 65 64 20 66 72 | 6f 6d 20 74 68 65 20 73 |ected fr|om the s|
|000003d0| 63 61 6e 20 6f 75 74 70 | 75 74 20 61 6e 64 20 64 |can outp|ut and d|
|000003e0| 65 6c 65 74 65 64 2e 0a | 58 41 20 67 72 65 70 20 |eleted..|XA grep |
|000003f0| 66 6f 72 20 22 3c 22 20 | 61 6e 64 20 22 3e 22 20 |for "<" |and ">" |
|00000400| 73 6f 6c 76 65 73 20 74 | 68 65 20 70 72 6f 62 6c |solves t|he probl|
|00000410| 65 6d 2e 0a 58 0a 58 52 | 6f 67 65 72 20 43 6f 72 |em..X.XR|oger Cor|
|00000420| 72 6f 6e 0a 58 72 63 40 | 62 6f 73 74 6f 6e 2e 73 |ron.Xrc@|boston.s|
|00000430| 67 69 2e 63 6f 6d 0a 58 | 0a 45 4e 44 5f 4f 46 5f |gi.com.X|.END_OF_|
|00000440| 46 49 4c 45 0a 69 66 20 | 74 65 73 74 20 33 35 38 |FILE.if |test 358|
|00000450| 20 2d 6e 65 20 60 77 63 | 20 2d 63 20 3c 27 52 45 | -ne `wc| -c <'RE|
|00000460| 41 44 2d 4d 45 27 60 3b | 20 74 68 65 6e 0a 20 20 |AD-ME'`;| then. |
|00000470| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 5c 22 27 | echo s|har: \"'|
|00000480| 52 45 41 44 2d 4d 45 27 | 5c 22 20 75 6e 70 61 63 |READ-ME'|\" unpac|
|00000490| 6b 65 64 20 77 69 74 68 | 20 77 72 6f 6e 67 20 73 |ked with| wrong s|
|000004a0| 69 7a 65 21 0a 66 69 0a | 23 20 65 6e 64 20 6f 66 |ize!.fi.|# end of|
|000004b0| 20 27 52 45 41 44 2d 4d | 45 27 0a 66 69 0a 69 66 | 'READ-M|E'.fi.if|
|000004c0| 20 74 65 73 74 20 2d 66 | 20 27 70 72 75 6e 65 6d | test -f| 'prunem|
|000004d0| 61 69 6c 27 20 2d 61 20 | 22 24 7b 31 7d 22 20 21 |ail' -a |"${1}" !|
|000004e0| 3d 20 22 2d 63 22 20 3b | 20 74 68 65 6e 20 0a 20 |= "-c" ;| then . |
|000004f0| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 57 69 6c 6c | echo sh|ar: Will|
|00000500| 20 6e 6f 74 20 63 6c 6f | 62 62 65 72 20 65 78 69 | not clo|bber exi|
|00000510| 73 74 69 6e 67 20 66 69 | 6c 65 20 5c 22 27 70 72 |sting fi|le \"'pr|
|00000520| 75 6e 65 6d 61 69 6c 27 | 5c 22 0a 65 6c 73 65 0a |unemail'|\".else.|
|00000530| 65 63 68 6f 20 73 68 61 | 72 3a 20 45 78 74 72 61 |echo sha|r: Extra|
|00000540| 63 74 69 6e 67 20 5c 22 | 27 70 72 75 6e 65 6d 61 |cting \"|'prunema|
|00000550| 69 6c 27 5c 22 20 5c 28 | 39 32 38 20 63 68 61 72 |il'\" \(|928 char|
|00000560| 61 63 74 65 72 73 5c 29 | 0a 73 65 64 20 22 73 2f |acters\)|.sed "s/|
|00000570| 5e 58 2f 2f 22 20 3e 27 | 70 72 75 6e 65 6d 61 69 |^X//" >'|prunemai|
|00000580| 6c 27 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 46 49 4c |l' <<'EN|D_OF_FIL|
|00000590| 45 27 0a 58 23 21 20 2f | 62 69 6e 2f 63 73 68 20 |E'.X#! /|bin/csh |
|000005a0| 2d 66 0a 58 23 20 65 6c | 69 6d 69 6e 61 74 65 20 |-f.X# el|iminate |
|000005b0| 61 6c 6c 20 6d 65 73 73 | 61 67 65 73 20 69 6e 20 |all mess|ages in |
|000005c0| 24 31 20 77 69 74 68 20 | 64 75 70 6c 69 63 61 74 |$1 with |duplicat|
|000005d0| 65 20 6d 65 73 73 61 67 | 65 2d 69 64 73 0a 58 23 |e messag|e-ids.X#|
|000005e0| 0a 58 23 20 53 75 62 6a | 65 63 74 3a 20 4d 48 20 |.X# Subj|ect: MH |
|000005f0| 75 74 69 6c 69 74 79 20 | 74 6f 20 64 65 6c 65 74 |utility |to delet|
|00000600| 65 20 64 75 70 6c 69 63 | 61 74 65 20 6d 65 73 73 |e duplic|ate mess|
|00000610| 61 67 65 73 20 69 6e 20 | 61 20 66 6f 6c 64 65 72 |ages in |a folder|
|00000620| 0a 58 23 20 44 61 74 65 | 3a 20 57 65 64 2c 20 31 |.X# Date|: Wed, 1|
|00000630| 39 20 41 75 67 20 39 32 | 20 31 31 3a 34 38 3a 34 |9 Aug 92| 11:48:4|
|00000640| 35 20 2d 30 34 30 30 0a | 58 23 20 46 72 6f 6d 3a |5 -0400.|X# From:|
|00000650| 20 42 6f 62 20 4d 75 6e | 63 6b 20 3c 6d 75 6e 63 | Bob Mun|ck <munc|
|00000660| 6b 40 53 74 61 72 73 2e | 52 65 73 74 6f 6e 2e 55 |k@Stars.|Reston.U|
|00000670| 6e 69 73 79 73 2e 43 4f | 4d 3e 0a 58 23 20 0a 58 |nisys.CO|M>.X# .X|
|00000680| 23 20 46 69 78 65 64 20 | 74 6f 20 64 65 6c 65 74 |# Fixed |to delet|
|00000690| 65 20 6f 6e 6c 79 20 6d | 65 73 73 61 67 65 73 20 |e only m|essages |
|000006a0| 77 69 74 68 20 6d 65 73 | 73 61 67 65 2d 69 64 73 |with mes|sage-ids|
|000006b0| 2e 0a 58 23 20 52 6f 67 | 65 72 20 43 6f 72 72 6f |..X# Rog|er Corro|
|000006c0| 6e 20 20 3c 72 63 40 62 | 6f 73 74 6f 6e 2e 73 67 |n <rc@b|oston.sg|
|000006d0| 69 2e 63 6f 6d 3e 0a 58 | 23 0a 58 23 20 49 20 64 |i.com>.X|#.X# I d|
|000006e0| 65 62 61 74 65 64 20 75 | 73 69 6e 67 20 22 24 31 |ebated u|sing "$1|
|000006f0| 22 20 65 76 65 72 79 77 | 68 65 72 65 20 49 20 68 |" everyw|here I h|
|00000700| 61 76 65 20 22 2b 24 31 | 22 2c 20 73 69 6e 63 65 |ave "+$1|", since|
|00000710| 20 74 68 65 20 75 73 65 | 72 0a 58 23 20 77 6f 75 | the use|r.X# wou|
|00000720| 6c 64 20 74 68 65 6e 20 | 6e 65 65 64 20 74 68 65 |ld then |need the|
|00000730| 20 22 2b 22 20 61 6e 64 | 20 77 6f 75 6c 64 20 62 | "+" and| would b|
|00000740| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 4d 48 20 63 |e follow|ing MH c|
|00000750| 6f 6e 76 65 6e 74 69 6f | 6e 73 0a 58 23 20 6d 6f |onventio|ns.X# mo|
|00000760| 72 65 20 63 6c 6f 73 65 | 6c 79 2e 20 20 49 20 73 |re close|ly. I s|
|00000770| 75 70 70 6f 73 65 20 61 | 20 72 65 61 6c 20 63 6f |uppose a| real co|
|00000780| 6e 76 65 6e 74 69 6f 6e | 2d 66 6f 6c 6c 6f 77 69 |nvention|-followi|
|00000790| 6e 67 20 75 74 69 6c 69 | 74 79 0a 58 23 20 77 6f |ng utili|ty.X# wo|
|000007a0| 75 6c 64 20 61 6c 73 6f | 20 61 6c 6c 6f 77 20 64 |uld also| allow d|
|000007b0| 65 66 61 75 6c 74 69 6e | 67 20 62 79 20 75 73 69 |efaultin|g by usi|
|000007c0| 6e 67 20 50 61 74 68 20 | 66 72 6f 6d 20 7e 2f 2e |ng Path |from ~/.|
|000007d0| 6d 68 2d 70 72 6f 66 69 | 6c 65 0a 58 23 20 74 6f |mh-profi|le.X# to|
|000007e0| 20 66 69 6e 64 20 63 6f | 6e 74 65 78 74 20 61 6e | find co|ntext an|
|000007f0| 64 20 67 65 74 74 69 6e | 67 20 43 75 72 72 65 6e |d gettin|g Curren|
|00000800| 74 2d 46 6f 6c 64 65 72 | 20 66 72 6f 6d 20 69 74 |t-Folder| from it|
|00000810| 2e 20 20 0a 58 0a 58 69 | 66 20 28 20 28 20 24 23 |. .X.Xi|f ( ( $#|
|00000820| 61 72 67 76 20 3d 3d 20 | 30 20 29 20 7c 7c 20 28 |argv == |0 ) || (|
|00000830| 20 24 31 20 3d 3d 20 2d | 68 65 6c 70 20 29 20 7c | $1 == -|help ) ||
|00000840| 7c 20 28 20 24 31 20 3d | 3d 20 2d 68 20 29 20 29 || ( $1 =|= -h ) )|
|00000850| 20 74 68 65 6e 0a 58 20 | 20 20 65 63 68 6f 20 27 | then.X | echo '|
|00000860| 55 53 41 47 45 3a 20 70 | 72 75 6e 65 2d 6d 61 69 |USAGE: p|rune-mai|
|00000870| 6c 20 66 6f 6c 64 65 72 | 27 0a 58 20 20 20 65 78 |l folder|'.X ex|
|00000880| 69 74 20 30 0a 58 20 20 | 20 65 6e 64 69 66 0a 58 |it 0.X | endif.X|
|00000890| 66 6f 6c 64 65 72 20 2b | 24 31 0a 58 73 65 74 20 |folder +|$1.Xset |
|000008a0| 73 20 3d 20 20 60 73 63 | 61 6e 20 2b 24 31 20 2d |s = `sc|an +$1 -|
|000008b0| 66 6f 72 6d 61 74 20 22 | 25 34 28 70 75 74 6e 75 |format "|%4(putnu|
|000008c0| 6d 66 28 6d 73 67 29 29 | 09 25 7b 6d 65 73 73 61 |mf(msg))|.%{messa|
|000008d0| 67 65 2d 69 64 7d 22 7c | 67 72 65 70 20 27 2e 2a |ge-id}"||grep '.*|
|000008e0| 3c 2e 2a 3e 2e 2a 27 20 | 7c 20 73 6f 72 74 20 2b |<.*>.*' || sort +|
|000008f0| 31 7c 75 6e 69 71 20 2d | 64 20 2b 35 7c 73 65 64 |1|uniq -|d +5|sed|
|00000900| 20 27 73 2f 09 2e 2a 24 | 2f 2f 27 60 0a 58 69 66 | 's/..*$|//'`.Xif|
|00000910| 20 28 20 22 24 73 22 20 | 21 3d 20 22 22 20 29 20 | ( "$s" |!= "" ) |
|00000920| 74 68 65 6e 0a 58 20 20 | 20 72 6d 6d 20 24 73 20 |then.X | rmm $s |
|00000930| 2b 24 31 0a 58 20 20 20 | 66 6f 6c 64 65 72 20 2b |+$1.X |folder +|
|00000940| 24 31 0a 58 20 20 20 65 | 6e 64 69 66 0a 45 4e 44 |$1.X e|ndif.END|
|00000950| 5f 4f 46 5f 46 49 4c 45 | 0a 69 66 20 74 65 73 74 |_OF_FILE|.if test|
|00000960| 20 39 32 38 20 2d 6e 65 | 20 60 77 63 20 2d 63 20 | 928 -ne| `wc -c |
|00000970| 3c 27 70 72 75 6e 65 6d | 61 69 6c 27 60 3b 20 74 |<'prunem|ail'`; t|
|00000980| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|00000990| 72 3a 20 5c 22 27 70 72 | 75 6e 65 6d 61 69 6c 27 |r: \"'pr|unemail'|
|000009a0| 5c 22 20 75 6e 70 61 63 | 6b 65 64 20 77 69 74 68 |\" unpac|ked with|
|000009b0| 20 77 72 6f 6e 67 20 73 | 69 7a 65 21 0a 66 69 0a | wrong s|ize!.fi.|
|000009c0| 23 20 65 6e 64 20 6f 66 | 20 27 70 72 75 6e 65 6d |# end of| 'prunem|
|000009d0| 61 69 6c 27 0a 66 69 0a | 65 63 68 6f 20 73 68 61 |ail'.fi.|echo sha|
|000009e0| 72 3a 20 45 6e 64 20 6f | 66 20 73 68 65 6c 6c 20 |r: End o|f shell |
|000009f0| 61 72 63 68 69 76 65 2e | 0a 65 78 69 74 20 30 0a |archive.|.exit 0.|
+--------+-------------------------+-------------------------+--------+--------+